package com.kun.framework.core.compoment;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 组件容器
 *
 * @author gzc
 * @since 2024/11/22
 **/
public class ComponentContext {

    private final static Map<Class<?>, Object> CONTEXT_MAP = new ConcurrentHashMap<>(16);

    public static <T> T get(Class<?> cls) {
        T t = null;
        if (cls != null) {
            t = (T) CONTEXT_MAP.get(cls);
        }
        return t;
    }
}
